v2.15.0#1663
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| resolve('error'); | ||
| }); | ||
| } else { | ||
| const httpsAgent = new https.Agent({ rejectUnauthorized: false }); // Disable SSL validation |
Check failure
Code scanning / CodeQL
Disabling certificate validation
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 year ago
To fix the problem, we need to ensure that certificate validation is not disabled. This can be done by removing the rejectUnauthorized: false option or setting it to true. This change will ensure that only trusted certificates are accepted, thereby maintaining the security of the TLS connection.
In the specific code snippet provided, we should modify the creation of the https.Agent to ensure that rejectUnauthorized is set to true. This change should be made in the sendMailProvider function within the sendMailv3.js file.
| @@ -51,3 +51,3 @@ | ||
| } else { | ||
| const httpsAgent = new https.Agent({ rejectUnauthorized: false }); // Disable SSL validation | ||
| const httpsAgent = new https.Agent({ rejectUnauthorized: true }); // Enable SSL validation | ||
| axios |
v2.15.0